import 'package:flutter/material.dart';

class SecondPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("second page"),
      ),
      body: Center(
          child: Column(
        children: [
          TextButton(
            child: Text("back to first page"),
            onPressed: () => {Navigator.pop(context)},
          ),
          TextButton(
            child: Text("turn to first page"),
            onPressed: () => Navigator.pushNamed(context, 'first'),
          ),
          TextButton(
              onPressed: () => Navigator.pushNamed(context, 'third'),
              child: Text("turn to third page")),
        ],
      )),
    );
  }
}
